<template>
<div>
	<span>做题榜</span>
	<div v-for="(item,index) in amountRankData" >
		<span> {{item.scoreStudentId}}:{{item.scoreQuestionAmount}}</span>
	</div>
	<span>正确率榜</span>
	<div v-for="(item,index) in rateRankData" >
		<span> {{item.scoreStudentId}}:{{item.scoreQuestionRate}}</span>
	</div>
</div>
</template>

<script>
export default {
 	data () {
      return {
        amountRankData:[],
        rateRankData:[]
      }
    },
    mounted(){
      this.amountRank()
      this.rateRank()
    },
    methods: {
      	amountRank(){
    		var a=this.$route.query.subject
        	let that = this
            that.axios.get('/iyx/ScoreRank/AmountRank/'+a).then(function (response) {
		    	that.amountRankData=response.data
		        console.info(response.data)
		        })
		        },
      	rateRank(){
    		var a=this.$route.query.subject
        	let that = this
            that.axios.get('/iyx/ScoreRank/RateRank/'+a).then(function (response) {
		    	that.rateRankData=response.data
		        console.info(response.data)
		        })
		        }
    }
}
</script>

<style>
</style>